package com.funong.matrix.biz.base.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.funong.matrix.core.base.FunongBaseEntity;
import com.funong.matrix.core.enums.FileCategoryType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * 文件基础信息表
 * </p>
 *
 * @author navigator
 * @since 2021-11-25
 */
@Data
@Accessors(chain = true)
@TableName("sys_file_info")
@ApiModel(value = "FileInfo对象", description = "文件基础信息表")
public class SysFileInfoEntity extends FunongBaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户名")
    @TableField(value = "operator")
    private String operator;

    @ApiModelProperty(value = "源文件名")
    @TableField(value = "original_file_name")
    private String originalFileName;

    @ApiModelProperty(value = "格式化名")
    @TableField(value = "new_file_name")
    private String newFileName;

    @ApiModelProperty(value = "文件后缀名 .png")
    @TableField(value = "extension")
    private String extension;

    @ApiModelProperty(value = "文件路径")
    @TableField(value = "path")
    private String path;

    @ApiModelProperty(value = "文件存储类型")
    @TableField(value = "fs_type")
    private Integer fsType;

    @ApiModelProperty(value = "文件存储地址")
    @TableField(value = "fs_path")
    private String fsPath;

    @ApiModelProperty(value = "文件大小")
    @TableField(value = "size")
    private String size;
    /**
     * 文件类型
     * {@link FileCategoryType}
     */
    @TableField(exist = false)
    private String fileCategoryType;

    /**
     * 文件具体类型
     */
    @TableField(exist = false)
    private String fileCategoryTypeInfo;

    /**
     * 业务文件状态
     */
    @TableField(exist = false)
    private Integer bizFileStatus;
    /**
     * 文件预览地址(域名+地址+sas-token)
     */
    @TableField(exist = false)
    private String fileUrl;
    /**
     * 文件预览地址(域名+地址)
     */
    @TableField(exist = false)
    private String filePathUrl;

    @TableField(exist = false)
    private Integer fileBusinessId;
}
